
// Boost Includes ==============================================================
#include <boost/python.hpp>
#include <boost/cstdint.hpp>

// Includes ====================================================================
#include <OpenSG/OSGImage.h>
#include <OpenSG/OSGImageBase.h>
#include <OsgPtrHelpers.h>

// Using =======================================================================
using namespace boost::python;

// Declarations ================================================================
namespace  {

BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(osg_Image_dump_overloads_0_2, dump, 0, 2)

BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(osg_Image_set_overloads_2_11, set, 2, 11)

BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(osg_Image_setData_overloads_0_1, setData, 0, 1)

BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(osg_Image_reformat_overloads_1_2, reformat, 1, 2)

BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(osg_Image_convertDataTypeTo_overloads_0_1, convertDataTypeTo, 0, 1)

BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(osg_Image_scale_overloads_1_4, scale, 1, 4)

BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(osg_Image_scaleNextPower2_overloads_0_1, scaleNextPower2, 0, 1)

BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(osg_Image_subImage_overloads_6_7, subImage, 6, 7)

BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(osg_Image_slice_overloads_0_4, slice, 0, 4)

BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(osg_Image_createMipmap_overloads_0_2, createMipmap, 0, 2)

BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(osg_Image_store_overloads_2_3, store, 2, 3)

BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(osg_Image_restore_overloads_1_2, restore, 1, 2)

BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(osg_Image_getSize_overloads_0_3, getSize, 0, 3)

BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(osg_Image_getData_overloads_0_3, getData, 0, 3)

BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(osg_Image_getDataByTime_overloads_1_2, getDataByTime, 1, 2)

BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(osg_Image_calcFrameNum_overloads_1_2, calcFrameNum, 1, 2)

BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(osg_Image_clear_overloads_0_1, clear, 0, 1)

BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(osg_Image_clearFloat_overloads_0_1, clearFloat, 0, 1)

BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(osg_Image_clearHalf_overloads_0_1, clearHalf, 0, 1)


}// namespace 


// Module ======================================================================
void Export_src_pyste_gen_Image()
{
    scope* osg_ImageBase_scope = new scope(
    class_< osg::ImageBase, bases< osg::AttachmentContainer > , boost::noncopyable >("ImageBase", no_init)
//        .def_readonly("ParentsFieldMask", &osg::ImageBase::ParentsFieldMask)
//        .def_readonly("DimensionFieldMask", &osg::ImageBase::DimensionFieldMask)
//        .def_readonly("WidthFieldMask", &osg::ImageBase::WidthFieldMask)
//        .def_readonly("HeightFieldMask", &osg::ImageBase::HeightFieldMask)
//        .def_readonly("DepthFieldMask", &osg::ImageBase::DepthFieldMask)
//        .def_readonly("BppFieldMask", &osg::ImageBase::BppFieldMask)
//        .def_readonly("MipMapCountFieldMask", &osg::ImageBase::MipMapCountFieldMask)
//        .def_readonly("FrameCountFieldMask", &osg::ImageBase::FrameCountFieldMask)
//        .def_readonly("FrameDelayFieldMask", &osg::ImageBase::FrameDelayFieldMask)
//        .def_readonly("PixelFormatFieldMask", &osg::ImageBase::PixelFormatFieldMask)
//        .def_readonly("PixelFieldMask", &osg::ImageBase::PixelFieldMask)
//        .def_readonly("FrameSizeFieldMask", &osg::ImageBase::FrameSizeFieldMask)
//        .def_readonly("NameFieldMask", &osg::ImageBase::NameFieldMask)
//        .def_readonly("DataTypeFieldMask", &osg::ImageBase::DataTypeFieldMask)
//        .def_readonly("ComponentSizeFieldMask", &osg::ImageBase::ComponentSizeFieldMask)
//        .def_readonly("SideCountFieldMask", &osg::ImageBase::SideCountFieldMask)
//        .def_readonly("SideSizeFieldMask", &osg::ImageBase::SideSizeFieldMask)
//        .def_readonly("ForceCompressedDataFieldMask", &osg::ImageBase::ForceCompressedDataFieldMask)
//        .def_readonly("ForceAlphaChannelFieldMask", &osg::ImageBase::ForceAlphaChannelFieldMask)
//        .def_readonly("ForceColorChannelFieldMask", &osg::ImageBase::ForceColorChannelFieldMask)
//        .def_readonly("MTInfluenceMask", &osg::ImageBase::MTInfluenceMask)
        .def("getClassType", &osg::ImageBase::getClassType, return_internal_reference< 1 >())
        .def("getClassTypeId", &osg::ImageBase::getClassTypeId)
        .def("getType", (osg::FieldContainerType& (osg::ImageBase::*)() )&osg::ImageBase::getType, return_internal_reference< 1 >())
        .def("getType", (const osg::FieldContainerType& (osg::ImageBase::*)() const)&osg::ImageBase::getType, return_internal_reference< 1 >())
        .def("getContainerSize", &osg::ImageBase::getContainerSize)
        //.def("getDimension", (osg::Int32& (osg::ImageBase::*)() )&osg::ImageBase::getDimension, return_value_policy< copy_const_reference >())
        .def("getDimension", (const osg::Int32& (osg::ImageBase::*)() const)&osg::ImageBase::getDimension, return_value_policy< copy_const_reference >())
        //.def("getWidth", (osg::Int32& (osg::ImageBase::*)() )&osg::ImageBase::getWidth, return_value_policy< copy_const_reference >())
        .def("getWidth", (const osg::Int32& (osg::ImageBase::*)() const)&osg::ImageBase::getWidth, return_value_policy< copy_const_reference >())
        //.def("getHeight", (osg::Int32& (osg::ImageBase::*)() )&osg::ImageBase::getHeight, return_value_policy< copy_const_reference >())
        .def("getHeight", (const osg::Int32& (osg::ImageBase::*)() const)&osg::ImageBase::getHeight, return_value_policy< copy_const_reference >())
        //.def("getDepth", (osg::Int32& (osg::ImageBase::*)() )&osg::ImageBase::getDepth, return_value_policy< copy_const_reference >())
        .def("getDepth", (const osg::Int32& (osg::ImageBase::*)() const)&osg::ImageBase::getDepth, return_value_policy< copy_const_reference >())
        //.def("getBpp", (osg::Int32& (osg::ImageBase::*)() )&osg::ImageBase::getBpp, return_value_policy< copy_const_reference >())
        .def("getBpp", (const osg::Int32& (osg::ImageBase::*)() const)&osg::ImageBase::getBpp, return_value_policy< copy_const_reference >())
        //.def("getMipMapCount", (osg::Int32& (osg::ImageBase::*)() )&osg::ImageBase::getMipMapCount, return_value_policy< copy_const_reference >())
        .def("getMipMapCount", (const osg::Int32& (osg::ImageBase::*)() const)&osg::ImageBase::getMipMapCount, return_value_policy< copy_const_reference >())
        //.def("getFrameCount", (osg::Int32& (osg::ImageBase::*)() )&osg::ImageBase::getFrameCount, return_value_policy< copy_const_reference >())
        .def("getFrameCount", (const osg::Int32& (osg::ImageBase::*)() const)&osg::ImageBase::getFrameCount, return_value_policy< copy_const_reference >())
        //.def("getFrameDelay", (osg::Time& (osg::ImageBase::*)() )&osg::ImageBase::getFrameDelay, return_value_policy< copy_const_reference >())
        .def("getFrameDelay", (const osg::Time& (osg::ImageBase::*)() const)&osg::ImageBase::getFrameDelay, return_value_policy< copy_const_reference >())
        //.def("getPixelFormat", (osg::UInt32& (osg::ImageBase::*)() )&osg::ImageBase::getPixelFormat, return_value_policy< copy_const_reference >())
        .def("getPixelFormat", (const osg::UInt32& (osg::ImageBase::*)() const)&osg::ImageBase::getPixelFormat, return_value_policy< copy_const_reference >())
        //.def("getFrameSize", (osg::Int32& (osg::ImageBase::*)() )&osg::ImageBase::getFrameSize, return_value_policy< copy_const_reference >())
        .def("getFrameSize", (const osg::Int32& (osg::ImageBase::*)() const)&osg::ImageBase::getFrameSize, return_value_policy< copy_const_reference >())
        //.def("getName", (std::string& (osg::ImageBase::*)() )&osg::ImageBase::getName, return_value_policy< copy_const_reference >())
        .def("getName", (const std::string& (osg::ImageBase::*)() const)&osg::ImageBase::getName, return_value_policy< copy_const_reference >())
        //.def("getDataType", (osg::Int32& (osg::ImageBase::*)() )&osg::ImageBase::getDataType, return_value_policy< copy_const_reference >())
        .def("getDataType", (const osg::Int32& (osg::ImageBase::*)() const)&osg::ImageBase::getDataType, return_value_policy< copy_const_reference >())
        //.def("getSideCount", (osg::Int32& (osg::ImageBase::*)() )&osg::ImageBase::getSideCount, return_value_policy< copy_const_reference >())
        .def("getSideCount", (const osg::Int32& (osg::ImageBase::*)() const)&osg::ImageBase::getSideCount, return_value_policy< copy_const_reference >())
        //.def("getSideSize", (osg::Int32& (osg::ImageBase::*)() )&osg::ImageBase::getSideSize, return_value_policy< copy_const_reference >())
        .def("getSideSize", (const osg::Int32& (osg::ImageBase::*)() const)&osg::ImageBase::getSideSize, return_value_policy< copy_const_reference >())
        //.def("getForceCompressedData", (bool& (osg::ImageBase::*)() )&osg::ImageBase::getForceCompressedData, return_value_policy< copy_const_reference >())
        .def("getForceCompressedData", (const bool& (osg::ImageBase::*)() const)&osg::ImageBase::getForceCompressedData, return_value_policy< copy_const_reference >())
        //.def("getForceAlphaChannel", (bool& (osg::ImageBase::*)() )&osg::ImageBase::getForceAlphaChannel, return_value_policy< copy_const_reference >())
        .def("getForceAlphaChannel", (const bool& (osg::ImageBase::*)() const)&osg::ImageBase::getForceAlphaChannel, return_value_policy< copy_const_reference >())
        //.def("getForceColorChannel", (bool& (osg::ImageBase::*)() )&osg::ImageBase::getForceColorChannel, return_value_policy< copy_const_reference >())
        .def("getForceColorChannel", (const bool& (osg::ImageBase::*)() const)&osg::ImageBase::getForceColorChannel, return_value_policy< copy_const_reference >())
        .def("getParents", (osg::FieldContainerPtr& (osg::ImageBase::*)(const osg::UInt32) )&osg::ImageBase::getParents, return_value_policy< copy_non_const_reference >())
        //.def("getParents", (osg::MFFieldContainerPtr& (osg::ImageBase::*)() )&osg::ImageBase::getParents, return_value_policy< copy_const_reference >())
        .def("getParents", (const osg::MFFieldContainerPtr& (osg::ImageBase::*)() const)&osg::ImageBase::getParents, return_value_policy< copy_const_reference >())
        .def("getPixel", (osg::UInt8& (osg::ImageBase::*)(const osg::UInt32) )&osg::ImageBase::getPixel, return_value_policy< copy_non_const_reference >())
        //.def("getPixel", (osg::MFUInt8& (osg::ImageBase::*)() )&osg::ImageBase::getPixel, return_value_policy< copy_const_reference >())
        .def("getPixel", (const osg::MFUInt8& (osg::ImageBase::*)() const)&osg::ImageBase::getPixel, return_value_policy< copy_const_reference >())
        .def("setDimension", &osg::ImageBase::setDimension)
        .def("setWidth", &osg::ImageBase::setWidth)
        .def("setHeight", &osg::ImageBase::setHeight)
        .def("setDepth", &osg::ImageBase::setDepth)
        .def("setBpp", &osg::ImageBase::setBpp)
        .def("setMipMapCount", &osg::ImageBase::setMipMapCount)
        .def("setFrameCount", &osg::ImageBase::setFrameCount)
        .def("setFrameDelay", &osg::ImageBase::setFrameDelay)
        .def("setPixelFormat", &osg::ImageBase::setPixelFormat)
        .def("setFrameSize", &osg::ImageBase::setFrameSize)
        .def("setName", &osg::ImageBase::setName)
        .def("setDataType", &osg::ImageBase::setDataType)
        .def("setSideCount", &osg::ImageBase::setSideCount)
        .def("setSideSize", &osg::ImageBase::setSideSize)
        .def("setForceCompressedData", &osg::ImageBase::setForceCompressedData)
        .def("setForceAlphaChannel", &osg::ImageBase::setForceAlphaChannel)
        .def("setForceColorChannel", &osg::ImageBase::setForceColorChannel)
        .def("getBinSize", &osg::ImageBase::getBinSize)
        .def("copyToBin", &osg::ImageBase::copyToBin)
        .def("copyFromBin", &osg::ImageBase::copyFromBin)
        .def("create", &osg::ImageBase::create)
        .def("createEmpty", &osg::ImageBase::createEmpty)
        .def("shallowCopy", &osg::ImageBase::shallowCopy)
        .staticmethod("getClassType")
        .staticmethod("create")
        .staticmethod("createEmpty")
        .staticmethod("getClassTypeId")
    );

    scope().attr("ComponentSizeFieldId") = (int)osg::ImageBase::ComponentSizeFieldId;
    scope().attr("DepthFieldId") = (int)osg::ImageBase::DepthFieldId;
    scope().attr("WidthFieldId") = (int)osg::ImageBase::WidthFieldId;
    scope().attr("ParentsFieldId") = (int)osg::ImageBase::ParentsFieldId;
    scope().attr("ForceColorChannelFieldId") = (int)osg::ImageBase::ForceColorChannelFieldId;
    scope().attr("SideCountFieldId") = (int)osg::ImageBase::SideCountFieldId;
    scope().attr("NextFieldId") = (int)osg::ImageBase::NextFieldId;
    scope().attr("ForceCompressedDataFieldId") = (int)osg::ImageBase::ForceCompressedDataFieldId;
    scope().attr("HeightFieldId") = (int)osg::ImageBase::HeightFieldId;
    scope().attr("SideSizeFieldId") = (int)osg::ImageBase::SideSizeFieldId;
    scope().attr("BppFieldId") = (int)osg::ImageBase::BppFieldId;
    scope().attr("ForceAlphaChannelFieldId") = (int)osg::ImageBase::ForceAlphaChannelFieldId;
    scope().attr("NameFieldId") = (int)osg::ImageBase::NameFieldId;
    scope().attr("DataTypeFieldId") = (int)osg::ImageBase::DataTypeFieldId;
    scope().attr("PixelFormatFieldId") = (int)osg::ImageBase::PixelFormatFieldId;
    scope().attr("MipMapCountFieldId") = (int)osg::ImageBase::MipMapCountFieldId;
    scope().attr("FrameSizeFieldId") = (int)osg::ImageBase::FrameSizeFieldId;
    scope().attr("FrameDelayFieldId") = (int)osg::ImageBase::FrameDelayFieldId;
    scope().attr("PixelFieldId") = (int)osg::ImageBase::PixelFieldId;
    scope().attr("FrameCountFieldId") = (int)osg::ImageBase::FrameCountFieldId;
    scope().attr("DimensionFieldId") = (int)osg::ImageBase::DimensionFieldId;

    delete osg_ImageBase_scope;

    scope* osg_Image_scope = new scope(
    class_< osg::Image, bases< osg::ImageBase > , boost::noncopyable, osg::ImageRefPtr >("Image", no_init)
        .def("changed", &osg::Image::changed)
        .def("dump", &osg::Image::dump, osg_Image_dump_overloads_0_2())
        .def("set", (bool (osg::Image::*)(osg::UInt32, osg::Int32, osg::Int32, osg::Int32, osg::Int32, osg::Int32, osg::Time, const osg::UInt8*, osg::Int32, bool, osg::Int32) )&osg::Image::set, osg_Image_set_overloads_2_11())
        .def("set", (bool (osg::Image::*)(osg::ImagePtr) )&osg::Image::set)
        .def("setData", &osg::Image::setData, osg_Image_setData_overloads_0_1())
        .def("clearData", &osg::Image::clearData)
        .def("setSubData", &osg::Image::setSubData)
        .def("flipDepthFrameData", &osg::Image::flipDepthFrameData)
        .def("addValue", &osg::Image::addValue)
        .def("reformat", &osg::Image::reformat, osg_Image_reformat_overloads_1_2())
        .def("swapDataEndian", &osg::Image::swapDataEndian)
        .def("convertDataTypeTo", &osg::Image::convertDataTypeTo, osg_Image_convertDataTypeTo_overloads_0_1())
        .def("scale", &osg::Image::scale, osg_Image_scale_overloads_1_4())
        .def("scaleNextPower2", &osg::Image::scaleNextPower2, osg_Image_scaleNextPower2_overloads_0_1())
        .def("subImage", &osg::Image::subImage, osg_Image_subImage_overloads_6_7())
        .def("slice", &osg::Image::slice, osg_Image_slice_overloads_0_4())
        .def("createMipmap", &osg::Image::createMipmap, osg_Image_createMipmap_overloads_0_2())
        .def("write", &osg::Image::write)
        .def("read", &osg::Image::read)
        .def("store", &osg::Image::store, osg_Image_store_overloads_2_3())
        .def("restore", &osg::Image::restore, osg_Image_restore_overloads_1_2())
        //.def("isValid", &osg::Image::isValid)
        .def("hasAlphaChannel", &osg::Image::hasAlphaChannel)
        .def("hasColorChannel", &osg::Image::hasColorChannel)
        .def("hasCompressedData", &osg::Image::hasCompressedData)
        .def("getComponents", &osg::Image::getComponents)
        .def("getSize", &osg::Image::getSize, osg_Image_getSize_overloads_0_3())
        //.def("getData", (const osg::UInt8* (osg::Image::*)(osg::UInt32, osg::UInt32, osg::UInt32) const)&osg::Image::getData, return_internal_reference< 1 >(), osg_Image_getData_overloads_0_3())
        //.def("getData", (osg::UInt8* (osg::Image::*)(osg::UInt32, osg::UInt32, osg::UInt32) )&osg::Image::getData, return_internal_reference< 1 >(), osg_Image_getData_overloads_0_3())
        //.def("getDataByTime", &osg::Image::getDataByTime, return_internal_reference< 1 >(), osg_Image_getDataByTime_overloads_1_2())
        .def("calcMipmapGeometry", &osg::Image::calcMipmapGeometry)
        .def("calcMipmapLevelCount", &osg::Image::calcMipmapLevelCount)
        //.def("calcFrameNum", &osg::Image::calcFrameNum, osg_Image_calcFrameNum_overloads_1_2())
        .def("clear", &osg::Image::clear, osg_Image_clear_overloads_0_1())
        .def("clearFloat", &osg::Image::clearFloat, osg_Image_clearFloat_overloads_0_1())
        .def("clearHalf", &osg::Image::clearHalf, osg_Image_clearHalf_overloads_0_1())
        .def("hasAttachment", &osg::Image::hasAttachment)
        .def("attachmentCount", &osg::Image::attachmentCount)
        .def("setAttachmentField", &osg::Image::setAttachmentField)
        .def("findAttachmentField", &osg::Image::findAttachmentField, return_internal_reference< 1 >())
        .def("calcMipmapLevelSize", (osg::UInt32 (osg::Image::*)(osg::UInt32, osg::UInt32, osg::UInt32, osg::UInt32) const)&osg::Image::calcMipmapLevelSize)
        .def("calcMipmapLevelSize", (osg::UInt32 (osg::Image::*)(osg::UInt32) const)&osg::Image::calcMipmapLevelSize)
        .def("calcMipmapSumSize", (osg::UInt32 (osg::Image::*)(osg::UInt32, osg::UInt32, osg::UInt32, osg::UInt32) const)&osg::Image::calcMipmapSumSize)
        .def("calcMipmapSumSize", (osg::UInt32 (osg::Image::*)(osg::UInt32) const)&osg::Image::calcMipmapSumSize)
        //.def( self < self )
        //.def( self == self )
        //.def( self != self )
    );

    enum_< osg::Image::PixelFormat >("PixelFormat")
        .value("OSG_RGB_DXT1", osg::Image::OSG_RGB_DXT1)
        .value("OSG_BGRA_PF", osg::Image::OSG_BGRA_PF)
        .value("OSG_L_PF", osg::Image::OSG_L_PF)
        .value("OSG_LA_PF", osg::Image::OSG_LA_PF)
        .value("OSG_RGBA_DXT5", osg::Image::OSG_RGBA_DXT5)
        .value("OSG_I_PF", osg::Image::OSG_I_PF)
        .value("OSG_BGR_PF", osg::Image::OSG_BGR_PF)
        .value("OSG_RGBA_DXT1", osg::Image::OSG_RGBA_DXT1)
        .value("OSG_RGBA_DXT3", osg::Image::OSG_RGBA_DXT3)
        .value("OSG_RGB_PF", osg::Image::OSG_RGB_PF)
        .value("OSG_INVALID_PF", osg::Image::OSG_INVALID_PF)
        .value("OSG_RGBA_PF", osg::Image::OSG_RGBA_PF)
    ;


    enum_< osg::Image::Type >("Type")
        .value("OSG_UINT32_IMAGEDATA", osg::Image::OSG_UINT32_IMAGEDATA)
        .value("OSG_UINT8_IMAGEDATA", osg::Image::OSG_UINT8_IMAGEDATA)
        .value("OSG_FLOAT32_IMAGEDATA", osg::Image::OSG_FLOAT32_IMAGEDATA)
        .value("OSG_UINT16_IMAGEDATA", osg::Image::OSG_UINT16_IMAGEDATA)
        .value("OSG_FLOAT16_IMAGEDATA", osg::Image::OSG_FLOAT16_IMAGEDATA)
        .value("OSG_INVALID_IMAGEDATATYPE", osg::Image::OSG_INVALID_IMAGEDATATYPE)
    ;

    delete osg_Image_scope;


    register_ptr_to_python<osg::ImagePtr>();
    implicitly_convertible<osg::ImageRefPtr, osg::ImagePtr>();
    implicitly_convertible<osg::ImagePtr, osg::AttachmentContainerPtr>();
    
    def("RefPtr", &pyopensg::ToRefPtr<osg::ImagePtr>);
    def("FCPtr", &pyopensg::ToFcPtr<osg::ImagePtr>);
}

